<!DOCTYPE html>
<html lang="zh-CN">

<head>
	<meta charset="UTF-8" />
	<meta name="author" content="wangbo" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<title>Document</title>
</head>

<body>
	<script>
		let num =10
		let input = Number(prompt("我写了一个数你猜一下"))
		while (input!=num) {
			if (input > num) {
				alert("您猜大了")
			} else {
				alert("您猜小了")
			}
			input = Number(prompt("继续猜"))
		}
		alert("恭喜你猜对了")
	</script>
</body>

</html>